<%-- 
    Document   : navigation
    Created on : 1/06/2010, 15:50:14
    Author     : huangp
--%>
<%@tag description="generate navigation links" pageEncoding="UTF-8"%>
<%-- The list of normal or fragment attributes can be specified here: --%>
<%@attribute name="page" type="net.huangp.framework.PageBasicImpl"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:choose>
    <c:when test="${page.previousAvailable}">
        <c:url var="prevUrl" value="/list.html">
            <c:param name="start" value="${page.previousStartIndex}" />
            <c:param name="max" value="${page.maxPerPage}" />
        </c:url>
        <a class="prevLink" href="${prevUrl}">Previous Page</a>
    </c:when>
    <c:otherwise>
        Previous Page
    </c:otherwise>
</c:choose>
<c:choose>
    <c:when test="${page.nextAvailable}">
        <c:url var="nextUrl" value="/list.html">
            <c:param name="start" value="${page.nextStartIndex}" />
            <c:param name="max" value="${page.maxPerPage}" />
        </c:url>
        <a class="nextLink" href="${nextUrl}">Next Page</a>
    </c:when>
    <c:otherwise>
        Next Page
    </c:otherwise>
</c:choose>
